from django.shortcuts import render_to_response

import views

def url(request, cmd, obj, key=0):
        '''url() is called from urls.py
                we use it to make a general command function.
                using this, we can let the code clean, and receive the commands and arguments from the URL
        '''
        f_name = obj+ '_' +cmd
	#try:
	call = getattr(views, f_name.lower())
        return call(request, key)
	#except:
	#	return render_to_response('content/error.html')

